#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include "trianglewindow.h"


int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);
    QSurfaceFormat format;
    format.setSamples(16);
    format.setDepthBufferSize(16);

    TriangleWindow window;
    window.setFormat( format );
    window.resize( 800, 480 );
    window.show();
    window.setAnimating(true);

    // QQmlApplicationEngine engine;
    // QObject::connect(
    //     &engine,
    //     &QQmlApplicationEngine::objectCreationFailed,
    //     &app,
    //     []() { QCoreApplication::exit(-1); },
    //     Qt::QueuedConnection);
    // engine.loadFromModule("OpenGLRenderTest", "Main");

    return app.exec();
}
